package com.neusoft.demo.mapper;


import com.neusoft.demo.pojo.Cart;
import com.neusoft.demo.pojo.Orders;
import org.apache.ibatis.annotations.*;

@Mapper
public interface OrdersMapper {
    @Select("select * from orders where userId=#{userId}")
    public java.util.List<Orders> orderList(int userId);
    @Insert("insert into orders(userId,businessId,orderDate,orderTotal,daId,foodId,num)" +
            "values(#{userId},#{businessId},#{orderDate},#{orderTotal},#{daId},#{foodId},#{num})")
    public  int addOrders(Orders orders);
    @Update("update orders set orderTotal=#{orderTotal},num=#{num},orderDate=#{orderDate} where  foodId=#{foodId}")
    public int updateOrders(Orders orders);
    @Delete("delete from orders where foodId=#{foodId}")
    public  int delOrders(int foodId);
    @Delete("delete from orders")
    public  int del(Orders orders);
    @Update("update orders set daId=#{daId} where  foodId=#{foodId}")
    public int updateOr(Orders orders);
}
